<template>
    <div>
        <h1>我你爹 -----{{val}}</h1>
        <button @click="fn">
            eventbus
        </button>
    </div>
</template>
<script>
import {bus} from '@/bus/index.js'
export default {
    data() {
        return {
            val:'老徐'
        }
    },
    methods: {
        fn(){
            bus.$emit('fn',this.val)
        }
    },
}
</script>